import wx

class ChartGridView(wx.ListCtrl):

    def __init__(self, parent, chartViewModel):
        try:
            super(ChartGridView, self).__init__(parent, style=wx.LC_REPORT)
            
            i = 0
            for col in chartViewModel._chartModel._columns:
                self.InsertColumn(i, col)
                i = i + 1
                
            for row in chartViewModel._chartModel._values:
                self.Append(row)
                
        except BaseException, e:
                print("ChartViewModel.Update Error %s", e)

                